In 2024 I programmed a raytracer in the V programming language to render simple geometric shapes with realistic shading based off of light sources and the position of the objects relative to the camera.
The raytracer has the following features:
- Render spheres, quad planes, planar circles, and cubes
- Antialiasing (increasing sample size per pixel)
- Blurred reflections
- Soft shadows via Area light
- Additional lighting options include point lights, directional lights, and ambient light
- Scenes for the raytracer can be specified in a JSON file (with many fields having default values, allowing them be omitted), and the raytracer will render each file one by one while also reporting the time it takes to render each.
- Mutltiprocessing enables scenes to be rendered with much greater speed; on my personal computer I reduced rendering time by over 85%.
Raytracing is a computationally expensive rendering technique; the image on this website of two spheres took a minute to render when using multiprocessing, making multiprocessing very important.
This project was written for a computer graphics class; screenshots of code output were posted here with the instructor's permission.
Please contact me if you are interested in viewing the code or would like to learn how raytracing works in more detail.